const {ccclass, property} = cc._decorator;
import {Gardener, GardenerView, IGardenerView} from "../gardener/GameGardener"

@ccclass
export default class HomeViewContainer extends GardenerView implements IGardenerView {

    @property(cc.Label)
    demoLabel: cc.Label = null;

    onBtnUserInfo_Tap(){
        Gardener.loadWindow(GardenerConfig.PrefabWindow.P_USER_INFO_WINDOW,(window)=>{
            let instance = cc.instantiate(window);
            window && Gardener.openWindow(instance);
        });
    }

    onBtnScene2_Tap(){
        Gardener.loadView(GardenerConfig.PrefabScene.P_DEMO_SCENE,(scene)=>{
            scene && Gardener.openView(cc.instantiate(scene), true);
        });

        
    }

    display(){
        GameLogger.debug('home scene display');
    }

    dispose(){
        GameLogger.debug('home scene dispose');
    }
}